var date = new Date();
var hour = date.getUTCHours();
var minute = date.getUTCMinutes();
var second = date.getUTCSeconds();
var month = date.getUTCMonth();
var day = date.getUTCDate();
var thirtymonths = [3, 5, 8, 10];
month += 1;

var lgnday = 05;
var lgnmonth = 8;
var lgnhour = 0;
var lgnminute = 30;

var dday;

if (lgnmonth === month) {
    if (lgnday == day) {
        if (lgnhour > hour) {
            document.write("Proksimume ", lgnhour - hour, " horoj ĝis ĉi LGN!");
        }
        if (lgnhour == hour) {
            if (lgnminute > minute) {
                document.write(lgnminute - minute, " minutoj ĝis ĉi LGN!");
            }
            if (lgnminute < minute) {
                document.write("LGN komencis ", minute - lgnminute, " minutojn paste-- venu, rapide!");
            }
        }
        if (lgnhour < hour) {
            document.write("LGN komencis ", hour - lgnhour, " horojn paste-- ne estas tro malfruaj!");
        }
    }
    else {
        document.write(lgnday - day, " tagoj ĝis sekva LGN!");
    }
}

if (lgnmonth !== month) {
    if (month in thirtymonths) {
        dday = 30 - day;
    }
    else {
        dday = 31 - day;
    }
    if (lgnmonth in thirtymonths) {
        dday += lgnday;
    }
    else {
        dday += lgnday;
    }
    document.write(dday, " tagoj ĝis sekva LGN!");
}




/*
@licstart  The Following is the entire license notice for the Javascript code in this page.

I, Jade Levesque, the copyright holder of the JavaScript embedded into this webpage, hereby release the JavaScript embedded into this webpage into the public domain. This applies worldwide. In case this is not legally possible, I grant any entity the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
(Are you happy now, LibreJS?)

@licend  The above is the entire license notice for the JavaScript code in this page.
*/
